<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<th:block th:include="include :: wxheader('申请提货')" />
		<th:block th:include="include :: swiper-css"></th:block>
		<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.3.1}" rel="stylesheet"/>
		<!--<meta charset="UTF-8">
		<title>申请提货</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
		<link rel="stylesheet"  href="css/mui.min.css" />
		<link rel="stylesheet" href="css/index.css" />-->
	</head>
	<body>
		<div class="bg">
			<header class="mui-bar mui-bar-nav">
				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
				<h1 class="mui-title">申请提货</h1>
				<a class="mui-action-back mui-icon mui-icon-home mui-pull-right"></a>
			</header>
			
			<div class="mui-content">
				<div class="fwcenter">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<div th:if="${bannerList!= null}"
								 th:each="banner: ${bannerList}"
								 class="swiper-slide">
								<img th:if="${banner!= null}"
									 th:src="${banner.bannerUrl}"
									 class="banner"
								/>
							</div>
						</div>
						<!-- 如果需要分页器 -->
						<div class="swiper-pagination"></div>
					</div>
					<!--<img th:src="@{/img/banner.jpg}" src="img/banner.jpg" class="banner">-->
					<form id="form">
					<div class="mui-input-row">
			            <label>提货码：</label>
			            <input name="code" type="number" placeholder="请输入提货码" required="required">
			          
			        </div>
			        <div class="mui-input-row">
						<label>提货密码：</label>
						<input name="password" type="password" class="mui-input-password" placeholder="请输入密码" data-input-password="3">
					</div>
					<div class="mui-input-row">
			            <label>验 证 码：</label>
			            <input class="code" name="validateCode" type="text" placeholder="获取验证码" required="required">
						<a href="javascript:void(0);" title="点击更换验证码">
							<img th:src="@{/captcha/captchaImage(type=number)}" class="imgcode yanzm"/>
						</a>
			           <!--<img th:src="@{/img/yanzm.jpg}" src="img/yanzm.jpg" class="yanzm">-->
			        </div>
			        
			         <div class="mui-button-row" id="sureBtn">
			           <button type="button" class="mui-btn defaultStatus">立即验证</button>
			        </div>
					</form>
			    </div>  
			</div>
			
			<div class="tips" th:utext="${details}">
				<!--<p th:if="${listValue!=null}"-->
				   <!--th:each="value : ${listValue}"-->
				   <!--th:text="${value}"-->
				<!--&gt;</p>-->
				<!--<p>1.天码提货系统，所有新老客户终身免费</p>
				<p>2.支持大闸蟹、海鲜大礼包、特产、牛羊肉、红酒等各行业提货需求；</p>
				<p>3.电话：4000-168-315获得提货系统解决方案</p>
				<p>4.提货卡免费设计，天码提货系统终身免费</p>-->
				<p>敬清注意：天码仅提供技术服务，具体产品发货事宜请咨询各礼券商家的联系方式！</p>
			</div>
			
			
			<!--<div class="mui-bar mui-bar-tab">-->
				<!--<ul>-->
					<!--<li>广州天码防伪科技有限公司</li>-->
					<!--<li>官网：http://www.tianma315.com/</li>-->
				<!--</ul>-->
			<!--</div>-->
	    </div>
	    
	   <!-- <script type="text/javascript" src="js/jquery-2.1.4.js"></script>
		<script type="text/javascript" src="js/mui.min.js"></script>-->
		<th:block th:include="include :: wxfooter" />
		<th:block th:include="include :: swiper-js"></th:block>
		<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.3.1}"></script>
		<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
		<script th:inline="javascript">
			// mui.init()
			//刷新验证码
			$('.imgcode').click(function() {
				var url = ctx + "captcha/captchaImage?type=number&s=" + Math.random();
				$(".imgcode").attr("src", url);
			});
			//验证
			$(".defaultStatus").click(function(){
				var code = $.common.trim($("input[name='code']").val());
				var validateCode = $("input[name='validateCode']").val();
				var password = $("input[name='password']").val();
				if (validateCode==''||validateCode==null||code==''||code==null||password==''||password==null){
					$.modal.msg('码不能为空')
				}else {
					layer.load();
					$.ajax({
						type: "post",
						url: ctx + "wx/json/testCode",
						data: $("#form").serialize(),
						success: function(r) {
							layer.closeAll('loading');
							$('.imgcode').click();
							$(".code").val("");
							if (r.code == 0) {
								 window.location.href=ctx+"/wx/index/goodDetail/"+r.data
							} else {
								// $.modal.closeLoading();
								$.modal.msg(r.msg);
							}
						}
					});
				}
				// window.location.href=ctx+"/wx/index/apply"
			})

			 new Swiper('.swiper-container', {
				loop: true, // 循环模式选项
				autoplay: 5000,
				pagination: {// 如果需要分页器
					el: '.swiper-pagination',
				}
			});
		</script>
	</body>
</html>
